<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:t="http://myfaces.apache.org/tomahawk">
<h:head>
 	<link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/style.css" ></link>
</h:head>
<h:body>
	<div class="homepage" title="#{msg.addETransactionPane}" >
			<table width="100%" cellspacing="0" cellpadding="50" border="50" >
				<tr>
					<td width="100%" height="70px"/>
				</tr>
				<tr>
					<td width="90%" height="300px" align = "right">
						<table width="100%">
							<tr>
								<td  width="10px" height="50px"/>
								<td  width="90%"><h:form><div class="tabs-secondary">
											<ul class="tabs secondary">
									    	
									    	<li>
										   			<h:commandLink action="#{chantierController.retourAuChantier}"  value="Chantiers"/>
										   			</li>
									    		<li>
									    			<h:commandLink  action="#{clientController.retourAuClient}" value="Clients"/> </li>
												<li>
										   			<h:commandLink action="#{associeController.retourAuAssocie}"  value="Associés"/>
										   			</li>
										    	<li>
									    			<h:commandLink  action="#{userController.retourAuUser}" value="Utilisateurs Systeme"/> </li>
									   		
									   		<li>
									    			<h:commandLink  action="#{employeController.retourAEmploye}" value="Employés"/> </li>
									   		
									   		<li>
									    			<h:commandLink  action="#{fournisseurController.retourAuFournisseur}" value="Fournisseurs"/> </li>
									   		
									    			</ul>
									    			
									    			
									    	<ul class="tabs secondary">
									    	
									    	<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>
									    	<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>
									    	<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>
									    	
									   		<li><h:commandLink  action="#{marchandiseController.retourAMarchandise}" value="Marchandises"/> </li>
   							    		    <li><h:commandLink  action="#{marchandiseController.retourACategorie}" value="Catégorie Marchandises"/> </li>
									    	<li><h:commandLink  action="#{fournisseurController.retourATypePaiement}" value="Types Paiements"/> </li>			
									    	</ul>
									  </div></h:form> 
								</td>
								<td/>
							</tr>
							<tr> 
								<td  width="10px" height="50px"/>
								<td  width="90%">
									<h:outputText value="#{msg.ajoutertransaction}" styleClass="welcomeAuth" />
								</td>
								<td/>
							</tr>
							<tr>
								<td  width="5px" height="100px"/>
								<td  style="margin:0 auto;">		
								<h:form>
									<table border="0" width="90%">
										<tr style="height: 10px" />
										<tr>
											<td align="left" width="150px;"><h:outputLabel value="#{msg.numBon}" styleClass="" /></td>
											<td align="left"><h:inputText value="#{transactionController.bonTransactionChantier.numBon}" /></td>
											
												
										</tr>
										<tr>
											<td align="left" width="150px;"><h:outputLabel value="#{msg.dateTransaction}" styleClass="" /></td>
											<td><rich:calendar datePattern="dd/M/yyyy" enableManualInput="true"
													value="#{transactionController.bonTransactionChantier.dateTransaction}" > 
												<rich:placeholder value="dd/mm/yyyy" />
											</rich:calendar></td>
										
											<td align="left" width="150px;"><h:outputLabel value="#{msg.prixTotalTransaction}" styleClass="" /></td>
											<td align="left"><h:inputText value="#{transactionController.bonTransactionChantier.prixTotalTransaction}" /></td>
										</tr>
									
																		
								
								<h:form>
																				
    								<h:dataTable value="#{transactionController.ligneTransactionChantiers}" var="ligneTransaction">

     								   <h:column>
           								 <f:facet name="header">
        							        <h:outputText value="Marchandise" />
      								      </f:facet>
      								      <h:selectOneMenu id="scategEmarchandise" value="#{transactionController.ligneTransactionChantier.idMarchandise}">
  										  <f:selectItems value="#{marchandiseController.listMarchand}" />
										</h:selectOneMenu>
    							      	     </h:column>

  							       <h:column>
 						               <f:facet name="header">
 						               <h:outputText value="Quantité" />
        					     	    </f:facet>
 							           <h:inputText value="#{ligneTransaction.qteTransactionMarchandise}"  />
  							      </h:column>
  							      
  							      
  							       <h:column>
 						               <f:facet name="header">
 						               <h:outputText value="Prix Unitaire" />
        					     	    </f:facet>
 							           <h:inputText value="#{ligneTransaction.prixUnitaireMarchandise}"  />
  							      </h:column>
  							      
  							       <h:column>
 						               <f:facet name="header">
 						               <h:outputText value="Prix Transaction" />
        					     	    </f:facet>
 							           <h:inputText value="#{ligneTransaction.prixTransactionMarchandise}"  />
  							      </h:column>
  							      
 								   </h:dataTable>
 									   <br/>
 									   <h:inputHidden binding="#{transactionController.addCount}" converter="javax.faces.Integer" />
								       <h:commandButton value="Add" action="#{transactionController.addNewligneTransaction}" />
								       <h:commandButton value="Save" action="#{transactionController.saveNewligneTransactions}" />

								</h:form>
								
								</table>
								</h:form>
								</td>
							<td  width="10px" height="100px">
						</td>
					</tr>
			</table>		
			</td>
				</tr>
			</table>		
	</div>
</h:body>
</html>